import unittest
from ddt import ddt,file_data
from selenium import webdriver
from pageobject.baidu_test import Baidu_serch
@ddt
class Baidu(unittest.TestCase):

    @classmethod
    def setUpClass(cls):
        #关联页面
        cls.driver = webdriver.Chrome()
        cls.bd = Baidu_serch(cls.driver)

    @classmethod
    def tearDownClass(cls):
        cls.driver.quit()

    @file_data("../data/baidu.yaml")
    #百度搜索测试
    def test_01(self,**kwargs):
        self.bd.serch(kwargs['txt'],kwargs['assdoc'])

